I have tried the helpful suggestions of those who responded to my query,
unfortunately I tried to run this code with the'debugger on' and I stepped thru
the entire code , but whenit gets to the end of the code where it is asked to print "Hello world' I get the bus error : 0x003FEFF6 at teh bottom of the debugger window....this occurs whether I place (WindowPtr)-1) (WindowPtr)-1 at rehdefines or at the function call to getHelloWindow:
> I have tried the helpful suggestions of those who responded to my query,
> unfortunately I tried to run this code with the'debugger on' and I stepped thru
> the entire code , but whenit gets to the end of the code where it is asked to print "Hello world' I get the bus error : 0x003FEFF6 at teh bottom of the debugger window....this occurs whether I place (WindowPtr)-1) (WindowPtr)-1 at rehdefines or at the f
I was lucky to get my 'hello world' program running by placing my resources in the right place, now that that problem has been solved..I got bored , andso I havecreated another resource, but now that it isplaced inthe proper place, I cannot get the SndPlay(mySnd) to function.....
The code is all thesame, but I have added the sound.h and a function that plays
a resource for me.. Wheni rn the debugger I get a syntax error at
SndChannel =&SndChannelPtr;
#define kAsync TRUE //play is asynchronous
#define mySndlID 129 //resource ID of 'snd'
#define BASE_RES_ID 400
#define NIL_POINTER 0L
#define MOVE_TO_FRONT ((WindowPtr)-1L)
#define REMOVE_ALL_EVENTS 0
#define HORIZONTAL_PIXEL 30
#define VERTICAL_PIXEL 50
WindowPtr gHelloWindow;
/*************************Main************/
#include <Sound.h>
void CallSndPlay(void);
void callSndPlay()
{
Handle mySndHandle;
ResType snd;
short rID;
rID = 129;
SndChannel = *SndChannelPtr;
SndChannelPtr mySndChan;
mySndChan = Chan1;
OSErr myErr;
//prototype for user defined error handling routine
There were over 16 bugs during compilation; I was able to fix 10 of them with my limited programming skills, and these are the remaining one. I would appreciate any insights and helpful corrections.
Thank you
CRL
Please feel free to comment on any of theabove as time warrants you!!!
>From egriffin@msmail4.hac.com 12 May 94 16:41:03 GMT